<?php

namespace App\Transformers\Personnel;

use App\Models\Personnel\Station;
use League\Fractal\TransformerAbstract;


class StationTransformer extends TransformerAbstract{

    public function transform(Station $model)
    {
        return [
            'id'                    => (int) $model->id,
            'role_id'               => $model->role_id,
            'name'                  => $model->name,
            'station_class_name'    => $model->station_class_name,
            'station_class_id'      => $model->station_class_id,
            'user_count'            => $model->user_count,
            'created_at'            => $model->created_at->format('Y-m-d H:i:s'),
            'updated_at'            => $model->updated_at->format('Y-m-d H:i:s')
        ];
    }
}
